﻿///***************************************************************
/// 시  스  템 : Updms.Fit
/// 단위시스템 : FIT
/// 계      층 : Presentation Layer
/// 프로그램명 : Fit2012r
/// 파  일  명 : Fit2012r.aspx.cs
/// 설      명 : 종합건강요약
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2014-06-12 송시명   최초 작성
///***************************************************************
using System;
using System.Collections;
using System.Data;
using System.Drawing;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

using SMFramework.Data;
using SMFramework.Utility;

using Base.AppFramework.Web.UI.CommandBar;
using Base.Dac;

using Updms.Common.BaseClass;
using Updms.Fit.Exe;


namespace Updms.Fit
{
	public partial class Fit2012r : Updms.Common.BaseClass.PageBase
	{
		#region 전역영역

		public static readonly string PID = "Fit2012r";
		public static readonly string gs_path_info = "/updms/Fit/" + PID + ".aspx";

		Global global = new Global();

		//검색
		protected string kw1 = "";	//기준년도

		//메뉴 선택값
		protected string gs_sm = "";

		//중량, 반복횟수합계
		decimal ld_weight_sum = 0;
		decimal ld_count_sum = 0;

		#endregion

		#region Page_Load, OnPageLoad

		protected void Page_Load(object sender, EventArgs e)
		{
			SetInit();
			if (!Page.IsPostBack)
			{
				// 최초 화면 로딩시 처리해야 할 부분
				OnPageLoad();
				SearchProcess();
			}
		}

		// OnPageLoad
		private void OnPageLoad()
		{
			SetLiterals(global.GetLabelInfoByPgmId(PID, LANG_SET));
			SetClientScript();
			SetBaseYear();
			SetSearchParameter();
		}

		#endregion

		#region InitializeComponent

		private void InitializeComponent()
		{
			this.Load += new System.EventHandler(this.Page_Load);
			this.PreRender += new System.EventHandler(this.Page_PreRender);
		}

		#endregion

		#region SetClientScript

		private void SetClientScript()
		{
		}

		#endregion

		#region SetInit, SetSearchParameter

		//초기값설정
		private void SetInit()
		{
			lbl_search_flag.Text = "INIT";
			gs_sm = (Request.QueryString["sm"] == null || Request.QueryString["sm"].Trim().Length != 7)
					? global.GetDirDepth(PID) : Request.QueryString["sm"].ToString();
		}

		//검색파라미터
		private void SetSearchParameter()
		{
			switch (lbl_search_flag.Text.Trim().ToUpper())
			{
				case "INIT":
					if (String.IsNullOrEmpty(Request.QueryString["kw1"]))
					{
						kw1 = ddl_search_base_year.SelectedValue;
					}
					else
					{
						kw1 = Server.UrlDecode(Request.QueryString["kw1"]);
						ddl_search_base_year.SelectedValue = kw1;
					}

					break;
				case "SEARCH":
					kw1 = ddl_search_base_year.SelectedValue;
					break;
			}
		}

		#endregion

		#region 마스터 Method (SetBaseYear, SetPrevNextYear, SetThisYear, SetEnabledYearBtn)

		//기준년도 설정
		private void SetBaseYear()
		{
			ddl_search_base_year.Items.Clear();

			for (int i = 2014; i <= Convert.ToInt32(DateUtil.GetYearEx(1, "yyyy")); i++)
			{
				string ls_year = i.ToString();
				ddl_search_base_year.Items.Add(new ListItem(ls_year, ls_year));
			}

			ddl_search_base_year.SelectedValue = DateUtil.GetYearEx(0, "yyyy"); // 기본값은 현재년도
		}

		//전년, 차년버튼 누르면
		private void SetPrevNextYear(int pi_year_cnt)
		{
			string ls_year = ddl_search_base_year.SelectedValue;
			string ls_calc_year = Convert.ToString(Convert.ToInt32(ls_year) + pi_year_cnt);

			if (WebControlUtil.CheckDdlValue(ddl_search_base_year, ls_calc_year))
			{
				ddl_search_base_year.SelectedValue = ls_calc_year;
			}

			//버튼처리
			SetEnabledYearBtn();
		}

		//당년설정
		private void SetThisYear()
		{
			string ls_this_year = DateUtil.GetNow("yyyy");
			ddl_search_base_year.SelectedValue = ls_this_year;
			SetEnabledYearBtn();
		}

		//전년, 차년버튼 처리
		private void SetEnabledYearBtn()
		{
			ibtn_prev_year.Enabled = (ddl_search_base_year.SelectedIndex == 0) ? false : true;
			ibtn_next_year.Enabled = (ddl_search_base_year.SelectedIndex == ddl_search_base_year.Items.Count - 1) ? false : true;
		}

		#endregion

		#region CRUD (SetTotalFitnessSummary, DrawTotalTrainingWeightCount, DrawTotalTrainingWeekDay, DrawInbodyRatioChart, SearchProcess)

		#region 신체지수
		//스냅샷,키,몸무게,BMI,체지방율,총운동일수,총일수,운동일수비율,총운동시간(분),금연,금주
		private void SetTotalFitnessSummary(DataSet lo_ds, string[] dt_name)
		{
			#region 스냅샷

			StringBuilder sb = new StringBuilder();
			sb.Append("<table class=\"body_snapshot\"><tr>");

			for (int i = 0; i < DataSetUtil.GetRowCount(lo_ds, dt_name[0]); i++)
			{
				string ls_file_dir = DataSetUtil.GetFldStr(lo_ds, dt_name[0], i, "File_Dir");
				string ls_file_nm = DataSetUtil.GetFldStr(lo_ds, dt_name[0], i, "File_Nm");
				string ls_file_ext = DataSetUtil.GetFldStr(lo_ds, dt_name[0], i, "File_Ext");
				string ls_measure_dt = DataSetUtil.GetFldStr(lo_ds, dt_name[0], i, "Measure_Dt");
				string ls_show_snapshot_fg = DataSetUtil.GetFldStr(lo_ds, dt_name[0], i, "Show_Snapshot_Fg");

				string ls_image_file = FILE_PATH_UPLOAD + "\\" + ls_file_dir + "\\" + ls_file_nm;

				if (FileUtil.IsFileExist(ls_image_file))
				{
					//확장자가 이미지파일인지
					if (ValidationUtil.IsFileExtImg(ls_file_ext))
					{
						if (i == 0)
						{
							string ls_first_image_path = "";

							//최근 스냅샷을 안보도록 되어있으면
							if (ls_show_snapshot_fg == "N")
							{
								ls_first_image_path = "<img src=\"" + FILE_PATH_COMMON_IMAGE + "no_snapshot.png\"";
							}
							else
							{
								ls_first_image_path = "<img src=\"" + FILE_PATH_UPLOAD_WEB_PATH + ls_file_dir + "/" + ls_file_nm + "\"";
							}

							//img에 onclick이벤트, class 추가
							ls_first_image_path += " onclick=\"viewSnapshotList();\" class=\"body_snapshot_recent\" />";

							//최근 스냅샷
							lbl_image_url.Text = "<span class=\"body_snapshot_dt\">" + ls_measure_dt + "</span><br />" + ls_first_image_path;
						}

						//전체 스냅샷
						sb.Append("<td align=\"center\"><span class=\"body_snapshot_dt\">" + ls_measure_dt + "</span><br />");
						sb.Append("<img src=\"" + FILE_PATH_UPLOAD_WEB_PATH + ls_file_dir + "/" + ls_file_nm + "\" class=\"body_snapshot_list\" /></td>");
					}
				}
			}

			sb.Append("</tr></table>");

			lbl_snapshot_list.Text = sb.ToString();

			#endregion

			#region 키,몸무게,BMI

			string ls_body_length = DataSetUtil.GetFldStr(lo_ds, dt_name[1], "Body_Length");
			string ls_body_weight = DataSetUtil.GetFldStr(lo_ds, dt_name[1], "Body_Weight");
			string ls_bmi = DataSetUtil.GetFldStr(lo_ds, dt_name[1], "BMI");

			lbl_body_length.Text = ls_body_length + " cm";
			lbl_body_weight.Text = "<b class=\"todo\">" + ls_body_weight + "</b> kg";
			lbl_bmi.Text = ls_bmi + " %";

			#endregion

			#region 체지방율,총운동일수,총일수,운동일수비율,총운동시간(분)

			string ls_soft_lean_mass = DataSetUtil.GetFldStr(lo_ds, dt_name[2], "Soft_Lean_Mass");
			string ls_body_fat_mass = DataSetUtil.GetFldStr(lo_ds, dt_name[2], "Body_Fat_Mass");
			string ls_body_fat_ratio = DataSetUtil.GetFldStr(lo_ds, dt_name[2], "Body_Fat_Ratio");
			string ls_waist_hip_fat_ratio = DataSetUtil.GetFldStr(lo_ds, dt_name[2], "Waist_Hip_Fat_Ratio");

			string ls_training_day =
				DataSetUtil.GetFldStr(lo_ds, dt_name[3], "Total_Training_Day") + " / " +
				DataSetUtil.GetFldStr(lo_ds, dt_name[3], "Total_Day");
			double ld_training_day_avg = DataSetUtil.GetFldDbl(lo_ds, dt_name[3], "Total_Training_Day_Avg");
			double ld_training_time = DataSetUtil.GetFldDbl(lo_ds, dt_name[3], "Total_Training_Minute");
			double ld_training_time_avg = DataSetUtil.GetFldDbl(lo_ds, dt_name[3], "Total_Training_Minute_Avg");

			lbl_soft_lean_mass.Text = ls_soft_lean_mass + " kg";
			lbl_body_fat_mass.Text = ls_body_fat_mass + " kg";
			lbl_body_fat_ratio.Text = "<b class=\"todo\">" + ls_body_fat_ratio + "</b> %";
			lbl_waist_hip_fat_ratio.Text = ls_waist_hip_fat_ratio + " %";

			//총운동시간(분)을 시간으로 환산
			double ld_training_hour = Math.Truncate(ld_training_time / 60); //7850 -> 130.8333 -> 130시간
			double ld_training_hour_min = ld_training_time - (ld_training_hour * 60); //7850 - (130 * 60) -> 50분

			lbl_training_day.Text = ls_training_day;
			lbl_training_day_avg.Text = ld_training_day_avg.ToString("#,##0.#0") + " %";
			lbl_training_time.Text = ld_training_time.ToString("#,##0") + " Min. ( " + ld_training_hour.ToString("#,##0") + " Hour " + ld_training_hour_min.ToString() + " Min. ), Avg. : " + ld_training_time_avg.ToString("#,##0") + " Min.";

			#endregion

			#region 금연,금주

			string ls_no_smoking_start_dt = "";
			int li_no_smoking_pass_day = 0;

			string ls_no_drinking_start_dt = "";
			int li_no_drinking_pass_day = 0;

			if (DataSetUtil.GetRowCount(lo_ds, dt_name[4]) > 1)
			{
				ls_no_smoking_start_dt = DataSetUtil.GetFldStr(lo_ds, dt_name[4], 0, "Start_Dt");
				li_no_smoking_pass_day = DataSetUtil.GetFldInt(lo_ds, dt_name[4], 0, "Pass_Day");

				ls_no_drinking_start_dt = DataSetUtil.GetFldStr(lo_ds, dt_name[4], 1, "Start_Dt");
				li_no_drinking_pass_day = DataSetUtil.GetFldInt(lo_ds, dt_name[4], 1, "Pass_Day");
			}

			ls_no_smoking_start_dt = ls_no_smoking_start_dt != "" ? "(" + ls_no_smoking_start_dt + ")" : "";
			ls_no_drinking_start_dt = ls_no_drinking_start_dt != "" ? "(" + ls_no_drinking_start_dt + ")" : "";

			lbl_no_smoking.Text = "<b class=\"todo\">" + li_no_smoking_pass_day.ToString("#,##0") + "</b> " + ls_no_smoking_start_dt;
			lbl_no_drinking.Text = "<b class=\"todo\">" + li_no_drinking_pass_day.ToString("#,##0") + "</b> " + ls_no_drinking_start_dt;

			#endregion
		}
		#endregion

		#region 부위별 운동수행결과
		//부위별 운동수행결과 챠트
		private void DrawTotalTrainingWeightCount(DataSet lo_ds, string dt_name)
		{
			int li_count = 0;

			//초기화
			chart_weight_count.Data.Clear();

			//시리즈 갯수
			chart_weight_count.Data.Series = 2;

			li_count = DataSetUtil.GetRowCount(lo_ds, dt_name);

			if (li_count > 0)
			{
				for (int i = 0; i < li_count; i++)
				{
					chart_weight_count.Data[0, i] = DataSetUtil.GetFldDbl(lo_ds, dt_name, (li_count - i) - 1, "Total_Count"); //횟수
					chart_weight_count.Data[1, i] = DataSetUtil.GetFldDbl(lo_ds, dt_name, (li_count - i) - 1, "Total_Weight"); //중량

					//X축 라벨링
					chart_weight_count.AxisX.Labels[i] = DataSetUtil.GetFldStr(lo_ds, dt_name, (li_count - i) - 1, "Training_Part_Nm");
				}
			}
			else
			{
				chart_weight_count.Visible = false;
			}

			GridView1.DataSource = lo_ds.Tables[dt_name];
			GridView1.DataBind();
		}
		#endregion

		#region 요일별 운동일
		//요일별 운동일 챠트
		private void DrawTotalTrainingWeekDay(DataSet lo_ds, string dt_name)
		{
			//초기화
			chart_training_day_by_weekday.Data.Clear();

			int li_count = DataSetUtil.GetRowCount(lo_ds, dt_name);

			for (int i = 0; i < li_count; i++)
			{
				string ls_label = DataSetUtil.GetFldStr(lo_ds, dt_name, i, "Week_Day")
				+ "[" + ConversionUtil.AddComma(DataSetUtil.GetFldStr(lo_ds, dt_name, i, "Training_Cnt")) + "]";

				chart_training_day_by_weekday.Data[0, i] = DataSetUtil.GetFldInt(lo_ds, dt_name, i, "Training_Cnt");
				chart_training_day_by_weekday.AxisX.Labels[i] = ls_label;
			}
		}
		#endregion

		#region 인바디지수
		//인바디지수 챠트
		private void DrawInbodyRatioChart(DataSet lo_ds, string dt_name)
		{
			//초기화
			chart_inbody_ratio.Data.Clear();

			//시리즈
			chart_inbody_ratio.Data.Series = 6;

			if (DataSetUtil.CheckRowCount(lo_ds, dt_name))
			{
				for (int i = 0; i < DataSetUtil.GetRowCount(lo_ds, dt_name); i++)
				{
					chart_inbody_ratio.Data[0, i] = DataSetUtil.GetFldDbl(lo_ds, dt_name, i, "Body_Weight");
					chart_inbody_ratio.Data[1, i] = DataSetUtil.GetFldDbl(lo_ds, dt_name, i, "Soft_Lean_Mass");
					chart_inbody_ratio.Data[2, i] = DataSetUtil.GetFldDbl(lo_ds, dt_name, i, "Body_Fat_Mass");
					chart_inbody_ratio.Data[3, i] = DataSetUtil.GetFldDbl(lo_ds, dt_name, i, "Waist_Hip_Fat_Ratio");
					chart_inbody_ratio.Data[4, i] = DataSetUtil.GetFldDbl(lo_ds, dt_name, i, "BMI");
					chart_inbody_ratio.Data[5, i] = DataSetUtil.GetFldDbl(lo_ds, dt_name, i, "Body_Fat_Ratio");

					//X축 라벨링
					chart_inbody_ratio.AxisX.Labels[i] = "'" + DataSetUtil.GetFldStr(lo_ds, dt_name, i, "Measure_Ym").Replace("-", ".").Substring(2, 5);

					//0은 안보여준다
					chart_inbody_ratio.Points[0, i].PointLabels.Visible = (chart_inbody_ratio.Data[0, i] > 0);
					chart_inbody_ratio.Points[1, i].PointLabels.Visible = (chart_inbody_ratio.Data[1, i] > 0);
					chart_inbody_ratio.Points[2, i].PointLabels.Visible = (chart_inbody_ratio.Data[2, i] > 0);
					chart_inbody_ratio.Points[3, i].PointLabels.Visible = (chart_inbody_ratio.Data[3, i] > 0);
					chart_inbody_ratio.Points[4, i].PointLabels.Visible = (chart_inbody_ratio.Data[4, i] > 0);
					chart_inbody_ratio.Points[5, i].PointLabels.Visible = (chart_inbody_ratio.Data[5, i] > 0);

					#region BMI
					/* BMI구분별 색깔
			         * 0 ~ 18.5 : 저체중(109, 193, 245) - 하늘
			         * 18.5 ~ 23 : 정상(84, 156, 77) - 녹색(목표)
			         * 23 ~ 25 : 과체중(249, 199, 42) - 노랑
			         * 25 ~ 30 : 비만(154, 42, 249) - 보라
			         * 30이상 : 고도비만(242, 43, 42) - 빨강
			         */
					double ld_bmi = chart_inbody_ratio.Data[4, i];

					if (0 <= ld_bmi && ld_bmi < 18.5)
					{
						chart_inbody_ratio.Points[4, i].Color = System.Drawing.Color.FromArgb(109, 193, 245); //저체중
					}
					else if (18.5 <= ld_bmi && ld_bmi < 23)
					{
						chart_inbody_ratio.Points[4, i].Color = System.Drawing.Color.FromArgb(84, 156, 77); //정상(목표)
					}
					else if (23 <= ld_bmi && ld_bmi < 25)
					{
						chart_inbody_ratio.Points[4, i].Color = System.Drawing.Color.FromArgb(249, 199, 42); //과체중
					}
					else if (25 <= ld_bmi && ld_bmi < 30)
					{
						chart_inbody_ratio.Points[4, i].Color = System.Drawing.Color.FromArgb(154, 42, 249); //비만
					}
					else if (30 <= ld_bmi)
					{
						chart_inbody_ratio.Points[4, i].Color = System.Drawing.Color.FromArgb(242, 43, 42); //고도비만
					}
					#endregion

					#region 체지방율
					/* 체지방율 색깔
			         * 0 ~ 12  : (109, 193, 245) - 하늘
			         * 13 ~ 15 : (84, 156, 77) - 녹색(목표)
			         * 16 ~ 18 : (249, 199, 42) - 노랑
			         * 19 ~ 20 : (154, 42, 249) - 보라
			         * 21이상   : (242, 43, 42) - 빨강
			         */
					double ld_body_fat_ratio = chart_inbody_ratio.Data[5, i];

					if (0 <= ld_body_fat_ratio && ld_body_fat_ratio < 13)
					{
						chart_inbody_ratio.Points[5, i].Color = System.Drawing.Color.FromArgb(109, 193, 245);
					}
					else if (13 <= ld_body_fat_ratio && ld_body_fat_ratio < 16)
					{
						chart_inbody_ratio.Points[5, i].Color = System.Drawing.Color.FromArgb(84, 156, 77); //목표
					}
					else if (16 <= ld_body_fat_ratio && ld_body_fat_ratio < 19)
					{
						chart_inbody_ratio.Points[5, i].Color = System.Drawing.Color.FromArgb(249, 199, 42);
					}
					else if (19 <= ld_body_fat_ratio && ld_body_fat_ratio < 21)
					{
						chart_inbody_ratio.Points[5, i].Color = System.Drawing.Color.FromArgb(154, 42, 249);
					}
					else if (21 <= ld_body_fat_ratio)
					{
						chart_inbody_ratio.Points[5, i].Color = System.Drawing.Color.FromArgb(242, 43, 42);
					}
					#endregion
				}
			}
		}
		#endregion

		#region 몸무게
		//몸무게
		private void DrawBodyWeightChart(DataSet lo_ds, string dt_name, string dt_name_chart)
		{
			//초기화
			chart_body_weight.Data.Clear();

			int li_count = DataSetUtil.GetRowCount(lo_ds, dt_name);

			for (int i = 0; i < li_count; i++)
			{
				string ls_label = DataSetUtil.GetFldStr(lo_ds, dt_name, i, "Measure_Ym");
				chart_body_weight.Data[0, i] = DataSetUtil.GetFldDbl(lo_ds, dt_name, i, "Body_Weight");
				chart_body_weight.AxisX.Labels[i] = ls_label;
			}

			//Y축 최소,최대값
			int axis_y_min = DataSetUtil.GetFldInt(lo_ds, dt_name_chart, 0, "Min_Body_Weight");
			int axis_y_max = DataSetUtil.GetFldInt(lo_ds, dt_name_chart, 0, "Max_Body_Weight");
			chart_body_weight.AxisY.Min = axis_y_min;
			chart_body_weight.AxisY.Max = axis_y_max;
		}
		#endregion

		#region 검색
		//검색
		private void SearchProcess()
		{
			lbl_search_flag.Text = "SEARCH";
			SetSearchParameter();

			DataPack lo_dp = new DataPack();
			DataSet lo_ds = new DataSet();

			lo_dp.AddProperty("ls_base_year", typeof(string), kw1);
			lo_dp.AddProperty("ls_lang_set", typeof(string), LANG_SET);

			//DataTable명 지정
			string[] dt_name = new string[] {	"BODY_SNAPSHOT",
												"WEIGHT_BMI",
												"BODY_FAT_RATIO",
												"TOTAL_TRAINING_TIME",
												"NO_SMOKING_DRINKING",
												"TOTAL_TRAINING_WEIGHT_COUNT",
												"TOTAL_TRAINING_WEEK_DAY",
												"INBODY_RATIO",
												"BODY_WEIGHT",
												"MIN_MAX_BODY_WEIGHT"
											};

			using (Fit2012r_NT _Fit2012r_NT = new Fit2012r_NT())
			{
				lo_ds.Merge(_Fit2012r_NT.GetTotalFitnessSummary(lo_dp, dt_name));
			}

			SetTotalFitnessSummary(lo_ds, dt_name);
			DrawTotalTrainingWeightCount(lo_ds, dt_name[5]);
			DrawTotalTrainingWeekDay(lo_ds, dt_name[6]);
			DrawInbodyRatioChart(lo_ds, dt_name[7]);
			DrawBodyWeightChart(lo_ds, dt_name[8], dt_name[9]);
		}
		#endregion

		#endregion

		#region Page_PreRender, ChangePageMode

		// Page_PreRender
		private void Page_PreRender(object sender, System.EventArgs e)
		{
			if (!Page.IsPostBack)
			{
				using (AccessCheck access = new AccessCheck())
				{
					//접근권한 체크
					if (!access.CheckPgmAccessGrant(PID, USER_ID, ACCESS_LOG_INFO))
					{
						Response.Redirect(URL_NO_AUTHORITY_REDIRECT_BASE);	//사용자의 권한은 요청하신 페이지를 볼 수 없습니다
					}
					//사용권한별 버튼처리
					PagePreRender.SetVisibleCtrl(this, access.CheckPgmUsingGrant(USER_DIV, PID), access.GetVisibleCtrl(PID));
				}
			}
			ChangePageMode();
		}

		//ChangePageMode
		private void ChangePageMode()
		{
			SetGridViewHeader(global.GetColumnListByPgmId(PID, LANG_SET));
		}

		#endregion

		#region GridView이벤트

		//RowDataBound
		protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
		{
			GridView gv = (GridView)sender;

			if (e.Row.RowType == DataControlRowType.DataRow)
			{
				switch (gv.DataKeys[e.Row.RowIndex].Values["Training_Part"].ToString())
				{
					case "BA002": //총계
						e.Row.Attributes.Add("class", "total_v3");
						for (int i = 0; i < e.Row.Cells.Count; i++)
						{
							e.Row.Cells[i].Attributes.Add("class", "div_line_tb_dbl");
						}
						break;
					default:
						break;
				}

				//중량합계
				ld_weight_sum += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Total_Weight"));

				//반복횟수합계
				ld_count_sum += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Total_Count"));
			}

			//Footer에 합계 바인딩
			if (e.Row.RowType == DataControlRowType.Footer)
			{
				e.Row.Cells[0].Text = "Total";
				e.Row.Cells[0].Attributes.Add("class", "total");
				e.Row.Cells[1].Text = ld_weight_sum.ToString("#,###,##0");
				e.Row.Cells[1].Attributes.Add("class", "money");
				e.Row.Cells[2].Text = ld_count_sum.ToString("#,###,##0");
				e.Row.Cells[2].Attributes.Add("class", "money");
			}
		}

		#endregion

		#region 버튼이벤트

		//검색
		protected void ibtn_search_Click(object sender, EventArgs e)
		{
			SetEnabledYearBtn();
			SearchProcess();
		}

		//스냅샷리스트 조회
		protected void lbtn_snapshot_list_Click(object sender, EventArgs e)
		{
			mpe_snapshot_list.Show();
		}

		//전년
		protected void ibtn_prev_year_Click(object sender, EventArgs e)
		{
			SetPrevNextYear(-1);
			SearchProcess();
		}

		//당년
		protected void ibtn_this_year_Click(object sender, EventArgs e)
		{
			SetThisYear();
			SearchProcess();
		}

		//차년
		protected void ibtn_next_year_Click(object sender, EventArgs e)
		{
			SetPrevNextYear(1);
			SearchProcess();
		}
		#endregion
	}
}